home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / rdf / rdf.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  121 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. /*
  39.  
  40.   A catch-all header file for miscellaneous RDF stuff. Currently
  41.   contains error codes and vocabulary macros.
  42.  
  43.  */
  44.  
  45. #ifndef rdf_h___
  46. #define rdf_h___
  47.  
  48. #include "nsError.h"
  49.  
  50. /**
  51.  * The following macros are to aid in vocabulary definition.  They
  52.  * creates const char*'s for "kURI[prefix]_[name]", appropriate
  53.  * complete namespace qualification on the URI, e.g.,
  54.  *
  55.  * #define RDF_NAMESPACE_URI "http://www.w3.org/TR/WD-rdf-syntax#"
  56.  * DEFINE_RDF_ELEMENT(RDF_NAMESPACE_URI, RDF, ID);
  57.  *
  58.  * will define:
  59.  *
  60.  * kURIRDF_ID to be "http://www.w3.org/TR/WD-rdf-syntax#ID"
  61.  */
  62.  
  63. #define DEFINE_RDF_VOCAB(ns, prefix, name) \
  64. static const char kURI##prefix##_##name[] = ns #name
  65.  
  66. /**
  67.  * Core RDF vocabularies that we use to define semantics
  68.  */
  69.  
  70. #define RDF_NAMESPACE_URI  "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  71. #define WEB_NAMESPACE_URI  "http://home.netscape.com/WEB-rdf#"
  72. #define NC_NAMESPACE_URI   "http://home.netscape.com/NC-rdf#"
  73. #define DEVMO_NAMESPACE_URI_PREFIX "http://developer.mozilla.org/rdf/vocabulary/"
  74.  
  75. /**
  76.  * @name Standard RDF error codes
  77.  */
  78.  
  79. /*@{*/
  80.  
  81. /* Returned from nsIRDFCursor::Advance() if the cursor has no more
  82.    elements to enuemrate */
  83. #define NS_RDF_CURSOR_EMPTY       NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_RDF, 1)
  84.  
  85. /* Returned from nsIRDFDataSource::GetSource() and GetTarget() if the source/target
  86.    has no value */
  87. #define NS_RDF_NO_VALUE           NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_RDF, 2)
  88.  
  89. /* Returned from nsIRDFDataSource::Assert() and Unassert() if the assertion (or
  90.    unassertion was accepted by the datasource*/
  91. #define NS_RDF_ASSERTION_ACCEPTED NS_OK
  92.  
  93. /* Returned from nsIRDFDataSource::Assert() and Unassert() if the assertion (or
  94.    unassertion) was rejected by the datasource; i.e., the datasource was not
  95.    willing to record the statement. */
  96. #define NS_RDF_ASSERTION_REJECTED NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_RDF, 3)
  97.  
  98. /* Return this from rdfITripleVisitor to stop cycling */
  99. #define NS_RDF_STOP_VISIT         NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_RDF, 4)
  100.  
  101.  
  102.  
  103. /* ContractID prefixes for RDF DLL registration. */
  104. #define NS_RDF_CONTRACTID                           "@mozilla.org/rdf"
  105. #define NS_RDF_DATASOURCE_CONTRACTID                NS_RDF_CONTRACTID "/datasource;1"
  106. #define NS_RDF_DATASOURCE_CONTRACTID_PREFIX         NS_RDF_DATASOURCE_CONTRACTID "?name="
  107. #define NS_RDF_RESOURCE_FACTORY_CONTRACTID          "@mozilla.org/rdf/resource-factory;1"
  108. #define NS_RDF_RESOURCE_FACTORY_CONTRACTID_PREFIX   NS_RDF_RESOURCE_FACTORY_CONTRACTID "?name="
  109. #define NS_RDF_INFER_DATASOURCE_CONTRACTID_PREFIX   NS_RDF_CONTRACTID "/infer-datasource;1?engine="
  110.  
  111. #define NS_RDF_SERIALIZER                            NS_RDF_CONTRACTID "/serializer;1?format="
  112.  
  113. // contract ID is in the form
  114. // @mozilla.org/rdf/delegate-factory;1?key=<key>&scheme=<scheme>
  115. #define NS_RDF_DELEGATEFACTORY_CONTRACTID    "@mozilla.org/rdf/delegate-factory;1"
  116. #define NS_RDF_DELEGATEFACTORY_CONTRACTID_PREFIX    NS_RDF_DELEGATEFACTORY_CONTRACTID "?key="
  117.  
  118. /*@}*/
  119.  
  120. #endif /* rdf_h___ */
  121.